﻿using Microsoft.EntityFrameworkCore;
using MS.Data.Domain;

namespace MS.Data.Infratructrue
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class MyDbContext : DbContext
    {
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="options">选项</param>
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 用户
        /// </summary>
        public DbSet<User> Users { get; set; }
        /// <summary>
        /// 角色
        /// </summary>
        public DbSet<Role> Roles{ get; set; }
        /// <summary>
        /// 角色用户
        /// </summary>
        public DbSet<RoleUser> RoleUsers{ get; set; }
        /// <summary>
        /// 权限
        /// </summary>
        public DbSet<Permission> Permissions{ get; set; }
        /// <summary>
        /// 角色权限
        /// </summary>
        public DbSet<RolePermission> RolePermissions{ get; set; }
    }
}
